var nowDate = getDay(0);
var pandianid = GetQueryString('pandianid');
var shopcode = sessionStorage.getItem("shopcode");
var shopname = sessionStorage.getItem("shopname");
var userId = sessionStorage.getItem("userId");
$(document).ready(function(){
	$('#nameh').text(shopcode+"."+shopname);
	$('#name').text(sessionStorage.getItem("name"));
	getPandianJianchaZicai();
});
//获取盘点检查信息
function getPandianJianchaZicai(){
	showloading();
	$.ajax({  
		url: "../pandianevery_jd/getPandianShopZicaiPandianZicai"
		,type:'post'
		,async: false
		,contentType: "application/json; charset=utf-8"
		,data:JSON.stringify({"pandianid":pandianid,'shopcode':shopcode,'pandianDate':nowDate}) 
		,dataType:'json'
		,success: function(res){
			console.log(res);
			try {
				if(res.success){
					var data = res.data;
					$('#Statueh').text(data[0].pandianFlagname);
					for (var i = 0; i < data.length; i++) {
						var pandiannum = data[i].pandiannum == undefined?"":data[i].pandiannum;
						$('#shujvdiv').append('<tr>'
								+'<td>'+data[i].gdsname+'</td>'
								+'<td>'+data[i].unit+'</td>'
								+'<td>'+data[i].sysnum+'</td>'
								+'<td>'+pandiannum+'</td>'
								+'<td>'+data[i].chayinum+'</td>'
								+'</tr>');
						pandiannum = null;
					}
				}else{
					$('#Statueh').text('未开始');
				}
			} catch (e) {
				console.log(e)
			} finally{
				hideloading();
			}
			
		}
	});
}
